package com.zhuhjay.eduservice.controller;


import com.zhuhjay.commonutils.R;
import com.zhuhjay.eduservice.entity.CrmBanner;
import com.zhuhjay.eduservice.service.CrmBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 首页banner表 前端控制器
 * </p>
 *
 * @author ZhuHJay
 * @since 2022-09-07
 */
@Api(description = "前端Banner接口")
@RestController
@RequestMapping("/educms/bannerfront")

public class BannerFrontController {

    @Resource
    private CrmBannerService bannerService;

    @ApiOperation(value = "获取所有的Banner")
    @GetMapping("getAllBanner")
    public R getAllBanner() {
        return R.ok().data("list", bannerService.selectBanner());
    }

}

